- /* sxcbexp1.cpp by K.Tsuru */
- // function ID 5102 BRADIX
- /***********************************
- SDecimal class
- base of natural logalithm in BRADIX
- exp(1)
- *************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- SDecimal BE(){
- SDecimal delta(0.5), bexp1(2.5);
- ulong mt = delta.SlOpMaxValue(), k = 3uL;
-
- do{
- XsDiv(delta, k, delta);
- XXAdd(bexp1, delta, bexp1);
- if( (k++) >= mt ){
- delta.SetError(delta.NOT_CONVERGE,"BE()", -5102); break;
- }
- }while(delta.Sign());
-
- delta.upToTerm = k;
- return bexp1;
- }
sxcbexp1.cpp : last modifiled at 2016/09/04 14:21:44(559 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:58 (Fri Oct 27 15:45:58 2017).